home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / public / GNU / emacs.inst / emacs19.idb / usr / gnu / info / elisp-20.z / elisp-20
Encoding:
GNU Info File  |  1994-08-02  |  50.2 KB  |  1,219 lines

  1. This is Info file elisp, produced by Makeinfo-1.55 from the input file
  2. elisp.texi.
  3.  
  4.    This version is newer than the second printed edition of the GNU
  5. Emacs Lisp Reference Manual.  It corresponds to Emacs Version 19.19.
  6.  
  7.    Published by the Free Software Foundation 675 Massachusetts Avenue
  8. Cambridge, MA 02139 USA
  9.  
  10.    Copyright (C) 1990, 1991, 1992, 1993 Free Software Foundation, Inc.
  11.  
  12.    Permission is granted to make and distribute verbatim copies of this
  13. manual provided the copyright notice and this permission notice are
  14. preserved on all copies.
  15.  
  16.    Permission is granted to copy and distribute modified versions of
  17. this manual under the conditions for verbatim copying, provided that
  18. the entire resulting derived work is distributed under the terms of a
  19. permission notice identical to this one.
  20.  
  21.    Permission is granted to copy and distribute translations of this
  22. manual into another language, under the above conditions for modified
  23. versions, except that this permission notice may be stated in a
  24. translation approved by the Foundation.
  25.  
  26.    Permission is granted to copy and distribute modified versions of
  27. this manual under the conditions for verbatim copying, provided also
  28. that the section entitled "GNU Emacs General Public License" is included
  29. exactly as in the original, and provided that the entire resulting
  30. derived work is distributed under the terms of a permission notice
  31. identical to this one.
  32.  
  33.    Permission is granted to copy and distribute translations of this
  34. manual into another language, under the above conditions for modified
  35. versions, except that the section entitled "GNU Emacs General Public
  36. License" may be included in a translation approved by the Free Software
  37. Foundation instead of in the original English.
  38.  
  39. 
  40. File: elisp,  Node: Deleting Windows,  Next: Selecting Windows,  Prev: Splitting Windows,  Up: Windows
  41.  
  42. Deleting Windows
  43. ================
  44.  
  45.    A window remains visible on its frame unless you "delete" it by
  46. calling certain functions that delete windows.  A deleted window cannot
  47. appear on the screen, but continues to exist as a Lisp object until
  48. there are no references to it.  There is no way to cancel the deletion
  49. of a window aside from restoring a saved window configuration (*note
  50. Window Configurations::.).  Restoring a window configuration also
  51. deletes any windows that aren't part of that configuration.
  52.  
  53.    When you delete a window, the space it took up is given to one
  54. adjacent sibling.  (In Emacs version 18, the space was divided evenly
  55. among all the siblings.)
  56.  
  57.  - Function: window-live-p WINDOW
  58.      This function returns `nil' if WINDOW is deleted, and `t'
  59.      otherwise.
  60.  
  61.      *Warning:* erroneous information or fatal errors may result from
  62.      using a deleted window as if it were live.
  63.  
  64.  - Command: delete-window &optional WINDOW
  65.      This function removes WINDOW from the display.  If WINDOW is
  66.      omitted, then the selected window is deleted.  An error is signaled
  67.      if there is only one window when `delete-window' is called.
  68.  
  69.      This function returns `nil'.
  70.  
  71.      When `delete-window' is called interactively, WINDOW defaults to
  72.      the selected window.
  73.  
  74.  - Command: delete-other-windows &optional WINDOW
  75.      This function makes WINDOW the only window on its frame, by
  76.      deleting all the other windows.  If WINDOW is omitted or `nil',
  77.      then the selected window is used by default.
  78.  
  79.      The result is `nil'.
  80.  
  81.  - Command: delete-windows-on BUFFER &optional FRAME
  82.      This function deletes all windows showing BUFFER.  If there are no
  83.      windows showing BUFFER, then this function does nothing.  If all
  84.      windows in some frame are showing BUFFER (including the case where
  85.      there is only one window), then the frame reverts to having a
  86.      single window showing the buffer chosen by `other-buffer'.  *Note
  87.      The Buffer List::.
  88.  
  89.      If there are several windows showing different buffers, then those
  90.      showing BUFFER are removed, and the others are expanded to fill the
  91.      void.
  92.  
  93.      If FRAME is a frame, then `delete-windows-on' considers just the
  94.      windows on FRAME.  If FRAME is `nil', all windows on all frames
  95.      are considered.  If FRAME is `t', that stands for the selected
  96.      frame.
  97.  
  98.      This function always returns `nil'.
  99.  
  100. 
  101. File: elisp,  Node: Selecting Windows,  Next: Cyclic Window Ordering,  Prev: Deleting Windows,  Up: Windows
  102.  
  103. Selecting Windows
  104. =================
  105.  
  106.    When a window is selected, the buffer in the window becomes the
  107. current buffer, and the cursor will appear in it.
  108.  
  109.  - Function: selected-window
  110.      This function returns the selected window.  This is the window in
  111.      which the cursor appears and to which many commands apply.
  112.  
  113.  - Function: select-window WINDOW
  114.      This function makes WINDOW the selected window.  The cursor then
  115.      appears in WINDOW (on redisplay).  The buffer being displayed in
  116.      WINDOW is immediately designated the current buffer.
  117.  
  118.      The return value is WINDOW.
  119.  
  120.           (setq w (next-window))
  121.           (select-window w)
  122.                => #<window 65 on windows.texi>
  123.  
  124.    The following functions choose one of the windows on the screen,
  125. offering various criteria for the choice.
  126.  
  127.  - Function: get-lru-window &optional ALL-FRAMES
  128.      This function returns the window least recently "used" (that is,
  129.      selected).  The selected window is always the most recently used
  130.      window.
  131.  
  132.      The selected window can be the least recently used window if it is
  133.      the only window.  A newly created window becomes the least
  134.      recently used window until it is selected.  The minibuffer window
  135.      is not considered a candidate.
  136.  
  137.      The argument ALL-FRAMES controls which set of windows are
  138.      considered.  If it is non-`nil', then all windows on all frames are
  139.      considered.  Otherwise, only windows in the selected frame are
  140.      considered.
  141.  
  142.  - Function: get-largest-window &optional ALL-FRAMES
  143.      This function returns the window with the largest area (height
  144.      times width).  If there are no side-by-side windows, then this is
  145.      the window with the most lines.  The minibuffer window is not
  146.      considered a candidate.
  147.  
  148.      If there are two windows of the same size, then the function
  149.      returns the window which is first in the cyclic ordering of
  150.      windows (see following section), starting from the selected window.
  151.  
  152.      The argument ALL-FRAMES controls which set of windows are
  153.      considered.  If it is non-`nil', then all windows on all frames are
  154.      considered.  Otherwise, only windows in the selected frame are
  155.      considered.
  156.  
  157. 
  158. File: elisp,  Node: Cyclic Window Ordering,  Next: Buffers and Windows,  Prev: Selecting Windows,  Up: Windows
  159.  
  160. Cycling Ordering of Windows
  161. ===========================
  162.  
  163.    When you use the command `C-x o' (`other-window') to select the next
  164. window, it moves through all the windows on the screen in a specific
  165. cyclic order.  For any given configuration of windows, this order never
  166. varies.  It is called the "cyclic ordering of windows".
  167.  
  168.    This ordering generally goes from top to bottom, and from left to
  169. right.  But it may go down first or go right first, depending on the
  170. order in which the windows were split.
  171.  
  172.    If the first split was vertical (into windows one above each other),
  173. and then the subwindows were split horizontally, then the ordering is
  174. left to right in the top, and then left to right in the next lower part
  175. of the frame, and so on.  If the first split was horizontal, the
  176. ordering is top to bottom in the left part, and so on.  In general,
  177. within each set of siblings at any level in the window tree, the order
  178. is left to right, or top to bottom.
  179.  
  180.  - Function: next-window WINDOW &optional MINIBUF ALL-FRAMES
  181.      This function returns the window following WINDOW in the cyclic
  182.      ordering of windows.  This is the window which `C-x o' would select
  183.      if done when WINDOW is selected.  If WINDOW is the only window
  184.      visible, then this function returns WINDOW.
  185.  
  186.      The value of the argument MINIBUF determines whether the
  187.      minibuffer is included in the window order.  Normally, when
  188.      MINIBUF is `nil', the minibuffer is included if it is currently
  189.      active; this is the behavior of `C-x o'.
  190.  
  191.      If MINIBUF is `t', then the cyclic ordering includes the
  192.      minibuffer window even if it is not active.
  193.  
  194.      If MINIBUF is neither `t' nor `nil', then the minibuffer window is
  195.      not included even if it is active.  (The minibuffer window is
  196.      active while the minibuffer is in use.  *Note Minibuffers::.)
  197.  
  198.      When there are multiple frames, this functions normally cycles
  199.      through all the windows in the selected frame, plus the minibuffer
  200.      used by the selected frame even if it lies in some other frame.
  201.  
  202.      If ALL-FRAMES is `t', then it cycles through all the windows in
  203.      all the frames that currently exist.
  204.  
  205.      If ALL-FRAMES is neither `t' nor `nil', then it cycles through
  206.      precisely the windows in the selected frame, excluding the
  207.      minibuffer in use if it lies in some other frame.
  208.  
  209.      This example shows two windows, which both happen to be displaying
  210.      the same buffer:
  211.  
  212.           (selected-window)
  213.                => #<window 56 on windows.texi>
  214.           (next-window (selected-window))
  215.                => #<window 52 on windows.texi>
  216.           (next-window (next-window (selected-window)))
  217.                => #<window 56 on windows.texi>
  218.  
  219.  - Function: previous-window WINDOW &optional MINIBUF ALL-FRAMES
  220.      This function returns the window preceding WINDOW in the cyclic
  221.      ordering of windows.  The other arguments affect which windows are
  222.      included in the cycle, as in `next-window'.
  223.  
  224.  - Command: other-window COUNT
  225.      This function selects the COUNTth next window in the cyclic order.
  226.      If count is negative, then it selects the -COUNTth preceding
  227.      window.  It returns `nil'.
  228.  
  229.      In an interactive call, COUNT is the numeric prefix argument.
  230.  
  231.  - Function: walk-windows PROC &optional MINIBUF ALL-FRAMES
  232.      This function cycles through all visible windows, calling `proc'
  233.      once for each window with the window as its sole argument.
  234.  
  235.      The optional argument MINIBUF says whether to include minibuffer
  236.      windows.  A value of `t' means count the minibuffer window even if
  237.      not active.  A value of `nil' means count it only if active.  Any
  238.      other value means not to count the minibuffer even if it is active.
  239.  
  240.      If the optional third argument ALL-FRAMES is `t', that means
  241.      include all windows in all frames.  If ALL-FRAMES is `nil', it
  242.      means to cycle within the selected frame, but include the
  243.      minibuffer window (if MINIBUF says so) that that frame uses, even
  244.      if it is on another frame.  If ALL-FRAMES is neither `nil' nor `t',
  245.      `walk-windows' sticks strictly to the selected frame.
  246.  
  247. 
  248. File: elisp,  Node: Buffers and Windows,  Next: Displaying Buffers,  Prev: Cyclic Window Ordering,  Up: Windows
  249.  
  250. Buffers and Windows
  251. ===================
  252.  
  253.    This section describes low-level functions to examine windows or to
  254. show buffers in windows in a precisely controlled fashion.  *Note
  255. Displaying Buffers::, for related functions that find a window to use
  256. and specify a buffer for it.  The functions described there are easier
  257. to use than these, but they employ heuristics in choosing or creating a
  258. window; use these functions when you need complete control.
  259.  
  260.  - Function: set-window-buffer WINDOW BUFFER-OR-NAME
  261.      This function makes WINDOW display BUFFER-OR-NAME as its contents.
  262.      It returns `nil'.
  263.  
  264.           (set-window-buffer (selected-window) "foo")
  265.                => nil
  266.  
  267.  - Function: window-buffer &optional WINDOW
  268.      This function returns the buffer that WINDOW is displaying.  If
  269.      WINDOW is omitted, then this function returns the buffer for the
  270.      selected window.
  271.  
  272.           (window-buffer)
  273.                => #<buffer windows.texi>
  274.  
  275.  - Function: get-buffer-window BUFFER-OR-NAME &optional ALL-FRAMES
  276.      This function returns a window currently displaying
  277.      BUFFER-OR-NAME, or `nil' if there is none.  If there are several
  278.      such windows, then the function returns the first one in the
  279.      cyclic ordering of windows, starting from the selected window.
  280.      *Note Cyclic Window Ordering::.
  281.  
  282.      The argument ALL-FRAMES controls which set of windows are
  283.      considered.
  284.         * If it is `nil', then windows on the selected frame are
  285.           considered.
  286.  
  287.         * If it is a frame, then windows on that frame are considered.
  288.  
  289.         * If it is `t', then windows on all visible frames are
  290.           considered.
  291.  
  292.         * If it is some other non-`nil' value, then all windows on all
  293.           frames are considered.
  294.  
  295.  - Command: replace-buffer-in-windows BUFFER
  296.      This function replaces BUFFER with some other buffer in all
  297.      windows displaying it.  The other buffer used is chosen with
  298.      `other-buffer'.  In the usual applications of this function, you
  299.      don't care which other buffer is used; you just want to make sure
  300.      that BUFFER is no longer displayed.
  301.  
  302.      This function returns `nil'.
  303.  
  304. 
  305. File: elisp,  Node: Displaying Buffers,  Next: Choosing Window,  Prev: Buffers and Windows,  Up: Windows
  306.  
  307. Displaying Buffers in Windows
  308. =============================
  309.  
  310.    In this section we describe convenient functions that choose a window
  311. automatically and use it to display a specified buffer.  These functions
  312. can also split an existing window in certain circumstances.  We also
  313. describe variables that parameterize the heuristics used for choosing a
  314. window.  *Note Buffers and Windows::, for low-level functions that give
  315. you more precise control.
  316.  
  317.    Do not use the functions in this section in order to make a buffer
  318. current so that a Lisp program can access or modify it; they are too
  319. drastic for that purpose, since they change the display of buffers in
  320. windows, which is gratuitous and will surprise the user.  Instead, use
  321. `set-buffer' (*note Current Buffer::.) and `save-excursion' (*note
  322. Excursions::.), which designate buffers as current for programmed
  323. access without affecting the display of buffers in windows.
  324.  
  325.  - Command: switch-to-buffer BUFFER-OR-NAME &optional NORECORD
  326.      This function makes BUFFER-OR-NAME the current buffer, and also
  327.      displays the buffer in the selected window.  This means that a
  328.      human can see the buffer and subsequent keyboard commands will
  329.      apply to it.  Contrast this with `set-buffer', which makes
  330.      BUFFER-OR-NAME the current buffer but does not display it in the
  331.      selected window.  *Note Current Buffer::.
  332.  
  333.      If BUFFER-OR-NAME does not identify an existing buffer, then a new
  334.      buffer by that name is created.
  335.  
  336.      Normally the specified buffer is put at the front of the buffer
  337.      list.  This affects the operation of `other-buffer'.  However, if
  338.      NORECORD is non-`nil', this is not done.  *Note The Buffer List::.
  339.  
  340.      The `switch-to-buffer' function is often used interactively, as
  341.      the binding of `C-x b'.  It is also used frequently in programs.
  342.      It always returns `nil'.
  343.  
  344.  - Command: switch-to-buffer-other-window BUFFER-OR-NAME
  345.      This function makes BUFFER-OR-NAME the current buffer and displays
  346.      it in a window not currently selected.  It then selects that
  347.      window.  The handling of the buffer is the same as in
  348.      `switch-to-buffer'.
  349.  
  350.      The previously selected window is absolutely never used to display
  351.      the buffer.  If it is the only window, then it is split to make a
  352.      distinct window for this purpose.  If the selected window is
  353.      already displaying the buffer, then it continues to do so, but
  354.      another window is nonetheless found to display it in as well.
  355.  
  356.  - Function: pop-to-buffer BUFFER-OR-NAME &optional OTHER-WINDOW
  357.      This function makes BUFFER-OR-NAME the current buffer and switches
  358.      to it in some window, preferably not the window previously
  359.      selected.  The "popped-to" window becomes the selected window.
  360.  
  361.      If the variable `pop-up-frames' is non-`nil', `pop-to-buffer'
  362.      creates a new frame to display the buffer in.  Otherwise, if the
  363.      variable `pop-up-windows' is non-`nil', windows may be split to
  364.      create a new window that is different from the original window.
  365.      For details, see *Note Choosing Window::.
  366.  
  367.      If OTHER-WINDOW is non-`nil', `pop-to-buffer' finds or creates
  368.      another window even if BUFFER-OR-NAME is already visible in the
  369.      selected window.  Thus BUFFER-OR-NAME could end up displayed in
  370.      two windows.  On the other hand, if BUFFER-OR-NAME is already
  371.      displayed in the selected window and OTHER-WINDOW is `nil', then
  372.      the selected window is considered sufficient display for
  373.      BUFFER-OR-NAME, so that nothing needs to be done.
  374.  
  375.      If BUFFER-OR-NAME is a string that does not name an existing
  376.      buffer, a buffer by that name is created.
  377.  
  378.      An example use of this function is found at the end of *Note
  379.      Filter Functions::.
  380.  
  381. 
  382. File: elisp,  Node: Choosing Window,  Next: Window Point,  Prev: Displaying Buffers,  Up: Windows
  383.  
  384. Choosing a Window
  385. =================
  386.  
  387.    This section describes the basic facility which chooses a window to
  388. display a buffer in--`display-buffer'.  All the higher-level functions
  389. and commands use this subroutine.  Here we describe how to use
  390. `display-buffer' and how to customize it.
  391.  
  392.  - Function: display-buffer BUFFER-OR-NAME &optional NOT-THIS-WINDOW
  393.      This function makes BUFFER-OR-NAME appear in some window, like
  394.      `pop-to-buffer', but it does not select that window and does not
  395.      make the buffer current.  The identity of the selected window is
  396.      unaltered by this function.
  397.  
  398.      If NOT-THIS-WINDOW is non-`nil', it means that the specified
  399.      buffer should be displayed in a window other than the selected
  400.      one, even if it is already on display in the selected window.
  401.      This can cause the buffer to appear in two windows at once.
  402.      Otherwise, if BUFFER-OR-NAME is already being displayed in any
  403.      window, that is good enough, so this function does nothing.
  404.  
  405.      `display-buffer' returns the window chosen to display
  406.      BUFFER-OR-NAME.
  407.  
  408.      Precisely how `display-buffer' finds or creates a window depends on
  409.      the variables described below.
  410.  
  411.    A window can be marked as "dedicated" to its buffer.  Then
  412. `display-buffer' does not try to use that window.
  413.  
  414.  - Function: window-dedicated-p WINDOW
  415.      This function returns `t' if WINDOW is marked as dedicated;
  416.      otherwise `nil'.
  417.  
  418.  - Function: set-window-dedicated-p WINDOW FLAG
  419.      This function marks WINDOW as dedicated if FLAGS is non-`nil', and
  420.      nondedicated otherwise.
  421.  
  422.  - User Option: pop-up-windows
  423.      This variable controls whether `display-buffer' makes new windows.
  424.      If it is non-`nil' and there is only one window, then that window
  425.      is split.  If it is `nil', then `display-buffer' does not split
  426.      the single window, but rather replaces its buffer.
  427.  
  428.  - User Option: split-height-threshold
  429.      This variable determines when `display-buffer' may split a window,
  430.      if there are multiple windows.  `display-buffer' splits the
  431.      largest window if it has at least this many lines.
  432.  
  433.      If there is only one window, it is split regardless of this value,
  434.      provided `pop-up-windows' is non-`nil'.
  435.  
  436.  - User Option: pop-up-frames
  437.      This variable controls whether `display-buffer' makes new frames.
  438.      If it is non-`nil', `display-buffer' makes a new frame.  If it is
  439.      `nil', then `display-buffer' either splits a window or reuses one.
  440.  
  441.      If this is non-`nil', the variables `pop-up-windows' and
  442.      `split-height-threshold' do not matter.
  443.  
  444.      *Note Frames::, for more information.
  445.  
  446.  - Variable: pop-up-frame-function
  447.      This variable specifies how to make a new frame if `pop-up-frame'
  448.      is non-`nil'.
  449.  
  450.      Its value should be a function of no arguments.  When
  451.      `display-buffer' makes a new frame, it does so by calling that
  452.      function, which should return a frame.  The default value of the
  453.      variable is a function which creates a frame using parameters from
  454.      `pop-up-frame-alist'.
  455.  
  456.  - Variable: pop-up-frame-alist
  457.      This variable holds an alist specifying frame parameters used when
  458.      `display-buffer' makes a new frame.  *Note Frame Parameters::, for
  459.      more information about frame parameters.
  460.  
  461.  - Variable: display-buffer-function
  462.      This variable is the most flexible way to customize the behavior of
  463.      `display-buffer'.  If it is non-`nil', it should be a function
  464.      that `display-buffer' calls to do the work.  The function should
  465.      accept two arguments, the same two arguments that `display-buffer'
  466.      received.  It should choose or create a window, display the
  467.      specified buffer, and then return the window.
  468.  
  469.      This hook takes precedence over all the other options and hooks
  470.      described above.
  471.  
  472. 
  473. File: elisp,  Node: Window Point,  Next: Window Start,  Prev: Choosing Window,  Up: Windows
  474.  
  475. Window Point
  476. ============
  477.  
  478.    Each window has its own value of point, independent of the value of
  479. point in other windows displaying the same buffer.  This makes it useful
  480. to have multiple windows showing one buffer.
  481.  
  482.    * The window point is established when a window is first created; it
  483.      is initialized from the buffer's point, or from the window point
  484.      of another window opened on the buffer if such a window exists.
  485.  
  486.    * Selecting a window sets the value of point in its buffer to the
  487.      window's value of point.  Conversely, deselecting a window sets
  488.      the window's value of point from that of the buffer.  Thus, when
  489.      you switch between windows that display a given buffer, the point
  490.      value for the selected window is in effect in the buffer, while
  491.      the point values for the other windows are stored in those windows.
  492.  
  493.    * As long as the selected window displays the current buffer, the
  494.      window's point and the buffer's point always move together; they
  495.      remain equal.
  496.  
  497.    * *Note Positions::, for more details on positions.
  498.  
  499.    As far as the user is concerned, point is where the cursor is, and
  500. when the user switches to another buffer, the cursor jumps to the
  501. position of point in that buffer.
  502.  
  503.  - Function: window-point WINDOW
  504.      This function returns the current position of point in WINDOW.
  505.      For a nonselected window, this is the value point would have (in
  506.      that window's buffer) if that window were selected.
  507.  
  508.      When WINDOW is the selected window and its buffer is also the
  509.      current buffer, the value returned is the same as point in that
  510.      buffer.
  511.  
  512.      Strictly speaking, it would be more correct to return the
  513.      "top-level" value of point, outside of any `save-excursion' forms.
  514.      But that value is hard to find.
  515.  
  516.  - Function: set-window-point WINDOW POSITION
  517.      This function positions point in WINDOW at position POSITION in
  518.      WINDOW's buffer.
  519.  
  520. 
  521. File: elisp,  Node: Window Start,  Next: Vertical Scrolling,  Prev: Window Point,  Up: Windows
  522.  
  523. The Window Start Position
  524. =========================
  525.  
  526.    Each window contains a marker used to keep track of a buffer position
  527. which specifies where in the buffer display should start.  This position
  528. is called the "display-start" position of the window (or just the
  529. "start").  The character after this position is the one that appears at
  530. the upper left corner of the window.  It is usually, but not
  531. inevitably, at the beginning of a text line.
  532.  
  533.  - Function: window-start &optional WINDOW
  534.      This function returns the display-start position of window WINDOW.
  535.      If WINDOW is `nil', the selected window is used.
  536.  
  537.           (window-start)
  538.                => 7058
  539.  
  540.      For a more complicated example of use, see the description of
  541.      `count-lines' in *Note Text Lines::.
  542.  
  543.  - Function: window-end &optional WINDOW
  544.      This function returns the position of the end of the display in
  545.      window WINDOW.  If WINDOW is `nil', the selected window is used.
  546.  
  547.  - Function: set-window-start WINDOW POSITION &optional NOFORCE
  548.      This function sets the display-start position of WINDOW to
  549.      POSITION in WINDOW's buffer.
  550.  
  551.      The display routines insist that the position of point be visible
  552.      when a buffer is displayed.  Normally, they change the
  553.      display-start position (that is, scroll the window) whenever
  554.      necessary to make point visible.  However, if you specify the
  555.      start position with this function with `nil' for NOFORCE, it means
  556.      you want display to start at POSITION even if that would put the
  557.      location of point off the screen.  What the display routines do in
  558.      this case is move point instead, to the left margin on the middle
  559.      line in the window.
  560.  
  561.      For example, if point is 1 and you attempt to set the start of the
  562.      window to 2, then the position of point would be "above" the top
  563.      of the window.  The display routines would automatically move
  564.      point if it is still 1 when redisplay occurs.  Here is an example:
  565.  
  566.           ;; Here is what `foo' looks like before executing
  567.           ;;   the `set-window-start' expression.
  568.           
  569.           ---------- Buffer: foo ----------
  570.           -!-This is the contents of buffer foo.
  571.           2
  572.           3
  573.           4
  574.           5
  575.           6
  576.           ---------- Buffer: foo ----------
  577.           
  578.           (set-window-start
  579.            (selected-window)
  580.            (1+ (window-start)))
  581.           
  582.           ;; Here is what `foo' looks like after executing
  583.           ;;   the `set-window-start' expression.
  584.           
  585.           ---------- Buffer: foo ----------
  586.           his is the contents of buffer foo.
  587.           2
  588.           3
  589.           -!-4
  590.           5
  591.           6
  592.           ---------- Buffer: foo ----------
  593.           
  594.                => 2
  595.  
  596.      However, when NOFORCE is non-`nil', `set-window-start' does
  597.      nothing if the specified start position would make point invisible.
  598.  
  599.      This function returns POSITION, regardless of whether the NOFORCE
  600.      option caused that position to be overruled.
  601.  
  602.  - Function: pos-visible-in-window-p &optional POSITION WINDOW
  603.      This function returns `t' if POSITION is within the range of text
  604.      currently visible on the screen in WINDOW.  It returns `nil' if
  605.      POSITION is scrolled vertically out of view.  The argument
  606.      POSITION defaults to the current position of point; WINDOW, to the
  607.      selected window.  Here is an example:
  608.  
  609.           (or
  610.           (pos-visible-in-window-p
  611.            (point) (selected-window))
  612.               (recenter 0))
  613.  
  614.      The `pos-visible-in-window-p' function considers only vertical
  615.      scrolling.  It returns `t' if POSITION is out of view only because
  616.      WINDOW has been scrolled horizontally.  *Note Horizontal
  617.      Scrolling::.
  618.  
  619. 
  620. File: elisp,  Node: Vertical Scrolling,  Next: Horizontal Scrolling,  Prev: Window Start,  Up: Windows
  621.  
  622. Vertical Scrolling
  623. ==================
  624.  
  625.    Vertical scrolling means moving the text up or down in a window.  It
  626. works by changing the value of the window's display-start location.  It
  627. may also change the value of `window-point' to keep it on the screen.
  628.  
  629.    In the commands `scroll-up' and `scroll-down', the directions "up"
  630. and "down" refer to the motion of the text in the buffer at which you
  631. are looking through the window.  Imagine that the text is written on a
  632. long roll of paper and that the scrolling commands move the paper up
  633. and down.  Thus, if you are looking at text in the middle of a buffer
  634. and repeatedly call `scroll-down', you will eventually see the
  635. beginning of the buffer.
  636.  
  637.    Some people have urged that the opposite convention be used: they
  638. imagine that the window moves over text that remains in place.  Then
  639. "down" commands would take you to the end of the buffer.  This view is
  640. more consistent with the actual relationship between windows and the
  641. text in the buffer, but it is less like what the user sees.  The
  642. position of a window on the terminal does not move, and short scrolling
  643. commands clearly move the text up or down on the screen.  We have chosen
  644. names that fit the user's point of view.
  645.  
  646.    The scrolling functions (aside from `scroll-other-window') will have
  647. unpredictable results if the current buffer is different from the
  648. buffer that is displayed in the selected window.  *Note Current
  649. Buffer::.
  650.  
  651.  - Command: scroll-up &optional COUNT
  652.      This function scrolls the text in the selected window upward COUNT
  653.      lines.  If COUNT is negative, scrolling is actually downward.
  654.  
  655.      If COUNT is `nil' (or omitted), then the length of scroll is
  656.      `next-screen-context-lines' lines less than the usable height of
  657.      the window (not counting its mode line).
  658.  
  659.      `scroll-up' returns `nil'.
  660.  
  661.  - Command: scroll-down &optional COUNT
  662.      This function scrolls the text in the selected window downward
  663.      COUNT lines.  If COUNT is negative, scrolling is actually upward.
  664.  
  665.      If COUNT is omitted or `nil', then the length of the scroll is
  666.      `next-screen-context-lines' lines less than the usable height of
  667.      the window.
  668.  
  669.      `scroll-down' returns `nil'.
  670.  
  671.  - Command: scroll-other-window &optional COUNT
  672.      This function scrolls the text in another window upward COUNT
  673.      lines.  Negative values of COUNT, or `nil', are handled as in
  674.      `scroll-up'.
  675.  
  676.      The window that is scrolled is normally the one following the
  677.      selected window in the cyclic ordering of windows--the window that
  678.      `next-window' would return.  *Note Cyclic Window Ordering::.
  679.  
  680.      If the selected window is the minibuffer, the next window is
  681.      normally the one at the top left corner.  However, you can specify
  682.      the window to scroll by binding the variable
  683.      `minibuffer-scroll-window'.  This variable has no effect when any
  684.      other window is selected.  *Note Minibuffer Misc::.
  685.  
  686.      When the minibuffer is active, it is the next window if the
  687.      selected window is the one at the bottom right corner.  In this
  688.      case, `scroll-other-window' attempts to scroll the minibuffer.  If
  689.      the minibuffer contains just one line, it has nowhere to scroll
  690.      to, so the line reappears after the echo area momentarily displays
  691.      the message "Beginning of buffer".
  692.  
  693.  - Variable: other-window-scroll-buffer
  694.      If this variable is non-`nil', it tells `scroll-other-window'
  695.      which buffer to scroll.
  696.  
  697.  - User Option: scroll-step
  698.      This variable controls how scrolling is done automatically when
  699.      point moves off the screen.  If the value is zero, then the text
  700.      is scrolled so that point is centered vertically in the window.
  701.      If the value is a positive integer N, then if it is possible to
  702.      bring point back on screen by scrolling N lines in either
  703.      direction, that is done; otherwise, point is centered vertically
  704.      as usual.  The default value is zero.
  705.  
  706.  - User Option: next-screen-context-lines
  707.      The value of this variable is the number of lines of continuity to
  708.      retain when scrolling by full screens.  For example, when
  709.      `scroll-up' executes, this many lines that were visible at the
  710.      bottom of the window move to the top of the window.  The default
  711.      value is `2'.
  712.  
  713.  - Command: recenter &optional COUNT
  714.      This function scrolls the selected window to put the text where
  715.      point is located at a specified vertical position within the
  716.      window.
  717.  
  718.      If COUNT is a nonnegative number, it puts the line containing
  719.      point COUNT lines down from the top of the window.  If COUNT is a
  720.      negative number, then it counts upward from the bottom of the
  721.      window, so that -1 stands for the last usable line in the window.
  722.      If COUNT is a non-`nil' list, then it stands for the line in the
  723.      middle of the window.
  724.  
  725.      If COUNT is `nil', then it puts the line containing point in the
  726.      middle of the window, then clears and redisplays the entire
  727.      selected frame.
  728.  
  729.      When `recenter' is called interactively, Emacs sets COUNT to the
  730.      raw prefix argument.  Thus, typing `C-u' as the prefix sets the
  731.      COUNT to a non-`nil' list, while typing `C-u 4' sets COUNT to 4,
  732.      which positions the current line four lines from the top.
  733.  
  734.      Typing `C-u 0 C-l' positions the current line at the top of the
  735.      window.  This action is so handy that some people bind the command
  736.      to a function key.  For example,
  737.  
  738.           (defun line-to-top-of-window ()
  739.             "Scroll current line to top of window.
  740.           Replaces three keystroke sequence C-u 0 C-l."
  741.             (interactive)
  742.             (recenter 0))
  743.           
  744.           (global-set-key "\C-cl" 'line-to-top-of-window)
  745.  
  746. 
  747. File: elisp,  Node: Horizontal Scrolling,  Next: Size of Window,  Prev: Vertical Scrolling,  Up: Windows
  748.  
  749. Horizontal Scrolling
  750. ====================
  751.  
  752.    Because we read English first from top to bottom and second from left
  753. to right, horizontal scrolling is not like vertical scrolling.  Vertical
  754. scrolling involves selection of a contiguous portion of text to display.
  755. Horizontal scrolling causes part of each line to go off screen.  The
  756. amount of horizontal scrolling is therefore specified as a number of
  757. columns rather than as a position in the buffer.  It has nothing to do
  758. with the display-start position returned by `window-start'.
  759.  
  760.    Usually, no horizontal scrolling is in effect; then the leftmost
  761. column is at the left edge of the window.  In this state, scrolling to
  762. the right is meaningless, since there is no data to the left of the
  763. screen to be revealed by it, so it is not allowed.  Scrolling to the
  764. left is allowed; it causes the first columns of text to go off the edge
  765. of the window and can reveal additional columns on the right that were
  766. truncated before.  Once a window has a nonzero amount of leftward
  767. horizontal scrolling, you can scroll it back to the right, but only so
  768. far as to reduce the net horizontal scroll to zero.  There is no limit
  769. to how far left you can scroll, but eventually all the text will
  770. disappear off the left edge.
  771.  
  772.  - Command: scroll-left COUNT
  773.      This function scrolls the selected window COUNT columns to the
  774.      left (or to the right if COUNT is negative).  The return value is
  775.      the total amount of leftward horizontal scrolling in effect after
  776.      the change--just like the value returned by `window-hscroll'.
  777.  
  778.  - Command: scroll-right COUNT
  779.      This function scrolls the selected window COUNT columns to the
  780.      right  (or to the left if COUNT is negative).  The return value is
  781.      the total amount of leftward horizontal scrolling in effect after
  782.      the change--just like the value returned by `window-hscroll'.
  783.  
  784.      Once you scroll a window as far right as it can go, back to its
  785.      normal position where the total leftward scrolling is zero,
  786.      attempts to scroll any farther have no effect.
  787.  
  788.  - Function: window-hscroll &optional WINDOW
  789.      This function returns the total leftward horizontal scrolling of
  790.      WINDOW--the number of columns by which the text in WINDOW is
  791.      scrolled left past the left margin.
  792.  
  793.      The value is never negative.  It is zero when no horizontal
  794.      scrolling has been done in WINDOW (which is usually the case).
  795.  
  796.      If WINDOW is `nil', the selected window is used.
  797.  
  798.           (window-hscroll)
  799.                => 0
  800.           (scroll-left 5)
  801.                => 5
  802.           (window-hscroll)
  803.                => 5
  804.  
  805.  - Function: set-window-hscroll WINDOW COLUMNS
  806.      This function sets the number of columns from the left margin that
  807.      WINDOW is scrolled to the value of COLUMNS.  The argument COLUMNS
  808.      should be zero or positive; if not, it is taken as zero.
  809.  
  810.      The value returned is COLUMNS.
  811.  
  812.           (set-window-hscroll (selected-window) 10)
  813.                => 10
  814.  
  815.    Here is how you can determine whether a given position POSITION is
  816. off the screen due to horizontal scrolling:
  817.  
  818.      (save-excursion
  819.        (goto-char POSITION)
  820.        (and
  821.         (>= (- (current-column) (window-hscroll WINDOW)) 0)
  822.         (< (- (current-column) (window-hscroll WINDOW))
  823.            (window-width WINDOW))))
  824.  
  825. 
  826. File: elisp,  Node: Size of Window,  Next: Resizing Windows,  Prev: Horizontal Scrolling,  Up: Windows
  827.  
  828. The Size of a Window
  829. ====================
  830.  
  831.    An Emacs window is rectangular, and its size information consists of
  832. the height (the number of lines) and the width (the number of character
  833. positions in each line).  The mode line is included in the height.  For
  834. a window that does not abut the right hand edge of the screen, the
  835. column of `|' characters that separates it from the window on the right
  836. is included in the width.
  837.  
  838.    The following three functions return size information about a window:
  839.  
  840.  - Function: window-height &optional WINDOW
  841.      This function returns the number of lines in WINDOW, including its
  842.      mode line.  If WINDOW fills its entire frame, this is one less
  843.      than the value of `frame-height' on that frame (since the last line
  844.      is always reserved for the minibuffer).
  845.  
  846.      If WINDOW is `nil', the function uses the selected window.
  847.  
  848.           (window-height)
  849.                => 23
  850.           (split-window-vertically)
  851.                => #<window 4 on windows.texi>
  852.           (window-height)
  853.                => 11
  854.  
  855.  - Function: window-width &optional WINDOW
  856.      This function returns the number of columns in WINDOW.  If WINDOW
  857.      fills its entire frame, this is the same as the value of
  858.      `frame-width' on that frame.
  859.  
  860.      If WINDOW is `nil', the function uses the selected window.
  861.  
  862.           (window-width)
  863.                => 80
  864.  
  865.  - Function: window-edges &optional WINDOW
  866.      This function returns a list of the edge coordinates of WINDOW.
  867.      If WINDOW is `nil', the selected window is used.
  868.  
  869.      The order of the list is `(LEFT TOP RIGHT BOTTOM)', all elements
  870.      relative to 0, 0 at the top left corner of the frame.  The element
  871.      RIGHT of the value is one more than the rightmost column used by
  872.      WINDOW, and BOTTOM is one more than the bottommost row used by
  873.      WINDOW and its mode-line.
  874.  
  875.      Here is the result obtained on a typical 24-line terminal with
  876.      just one window:
  877.  
  878.           (window-edges (selected-window))
  879.                => (0 0 80 23)
  880.  
  881.      If WINDOW is at the upper left corner of its frame, RIGHT and
  882.      BOTTOM are the same as the values returned by `(window-width)' and
  883.      `(window-height)' respectively, and TOP and BOTTOM are zero.  For
  884.      example, the edges of the following window are `0 0 5 8'.
  885.      Assuming that the frame has more than 8 columns, the last column
  886.      of the window (column 7) holds a border rather than text.  The
  887.      last row (row 4) holds the mode line, shown here with `xxxxxxxxx'.
  888.  
  889.                      0
  890.                      _______
  891.                   0 |       |
  892.                     |       |
  893.                     |       |
  894.                     |       |
  895.                     xxxxxxxxx  4
  896.           
  897.                             7
  898.  
  899.      When there are side-by-side windows, any window not at the right
  900.      edge of its frame has a border in its last column.  This border
  901.      counts as one column in the width of the window.  A window never
  902.      includes a border on its left, since the border there belongs to
  903.      the window to the left.
  904.  
  905.      In the following example, let's imagine that the frame is 7
  906.      columns wide.  Then the edges of the left window are `0 0 4 3' and
  907.      the edges of the right window are `4 0 7 3'.
  908.  
  909.                      ___ ___
  910.                     |   |   |
  911.                     |   |   |
  912.                     xxxxxxxxx
  913.           
  914.                      0  34  7
  915.  
  916. 
  917. File: elisp,  Node: Resizing Windows,  Next: Coordinates and Windows,  Prev: Size of Window,  Up: Windows
  918.  
  919. Changing the Size of a Window
  920. =============================
  921.  
  922.    The window size functions fall into two classes: high-level commands
  923. that change the size of windows and low-level functions that access
  924. window size.  Emacs does not permit overlapping windows or gaps between
  925. windows, so resizing one window affects other windows.
  926.  
  927.  - Command: enlarge-window SIZE &optional HORIZONTAL
  928.      This function makes the selected window SIZE lines bigger,
  929.      stealing lines from neighboring windows.  It takes the lines from
  930.      one window at a time until that window is used up, then takes from
  931.      another.  If a window from which lines are stolen shrinks below
  932.      `window-min-height' lines, then that window disappears.
  933.  
  934.      If HORIZONTAL is non-`nil', then this function makes WINDOW wider
  935.      by SIZE columns, stealing columns instead of lines.  If a window
  936.      from which columns are stolen shrinks below `window-min-width'
  937.      columns, then that window disappears.
  938.  
  939.      If the window's frame is smaller than SIZE lines (or columns),
  940.      then the function makes the window occupy the entire height (or
  941.      width) of the frame.
  942.  
  943.      If SIZE is negative, this function shrinks the window by -SIZE
  944.      lines.  If it becomes shorter than `window-min-height', it
  945.      disappears.
  946.  
  947.      `enlarge-window' returns `nil'.
  948.  
  949.  - Command: enlarge-window-horizontally COLUMNS
  950.      This function makes the selected window COLUMNS wider.  It could
  951.      be defined as follows:
  952.  
  953.           (defun enlarge-window-horizontally (columns)
  954.             (enlarge-window columns t))
  955.  
  956.  - Command: shrink-window SIZE &optional HORIZONTAL
  957.      This function is like `enlarge-window' but negates the argument
  958.      SIZE, making the selected window smaller by giving lines (or
  959.      columns) to the other windows.  If the window shrinks below
  960.      `window-min-height' or `window-min-width', then it disappears.
  961.  
  962.      If SIZE is negative, the window is enlarged by -SIZE lines.
  963.  
  964.  - Command: shrink-window-horizontally COLUMNS
  965.      This function makes the selected window COLUMNS narrower.  It
  966.      could be defined as follows:
  967.  
  968.           (defun shrink-window-horizontally (columns)
  969.             (shrink-window columns t))
  970.  
  971.    The following two variables constrain the window size changing
  972. functions to a minimum height and width.
  973.  
  974.  - User Option: window-min-height
  975.      The value of this variable determines how short a window may become
  976.      before it disappears.  A window disappears when it becomes smaller
  977.      than `window-min-height', and no window may be created that is
  978.      smaller.  The absolute minimum height is two (allowing one line
  979.      for the mode line, and one line for the buffer display).  Actions
  980.      which change window sizes reset this variable to two if it is less
  981.      than two.  The default value is 4.
  982.  
  983.  - User Option: window-min-width
  984.      The value of this variable determines how narrow a window may
  985.      become before it disappears.  A window disappears when it becomes
  986.      narrower than `window-min-width', and no window may be created
  987.      that is narrower.  The absolute minimum width is one; any value
  988.      below that is ignored.  The default value is 10.
  989.  
  990. 
  991. File: elisp,  Node: Coordinates and Windows,  Next: Window Configurations,  Prev: Resizing Windows,  Up: Windows
  992.  
  993. Coordinates and Windows
  994. =======================
  995.  
  996.    This section describes how to compare screen coordinates with
  997. windows.
  998.  
  999.  - Function: window-at X Y &optional FRAME
  1000.      This function returns the window containing the specified cursor
  1001.      position in the frame FRAME.  The coordinates X and Y are measured
  1002.      in characters and count from the top left corner of the screen or
  1003.      frame.
  1004.  
  1005.      If you omit FRAME, the selected frame is used.
  1006.  
  1007.  - Function: coordinates-in-window-p COORDINATES WINDOW
  1008.      This function checks whether a particular frame position falls
  1009.      within the window WINDOW.
  1010.  
  1011.      The argument COORDINATES is a cons cell of this form:
  1012.  
  1013.           (X . Y)
  1014.  
  1015.      The coordinates X and Y are measured in characters, and count from
  1016.      the top left corner of the screen or frame.
  1017.  
  1018.      The value of `coordinates-in-window-p' is non-`nil' if the
  1019.      coordinates are inside WINDOW.  The value also indicates what part
  1020.      of the window the position is in, as follows:
  1021.  
  1022.     `(RELX . RELY)'
  1023.           The coordinates are inside WINDOW.  The numbers RELX and RELY
  1024.           are the equivalent window-relative coordinates for the
  1025.           specified position, counting from 0 at the top left corner of
  1026.           the window.
  1027.  
  1028.     `mode-line'
  1029.           The coordinates are in the mode line of WINDOW.
  1030.  
  1031.     `vertical-split'
  1032.           The coordinates are in the vertical line between WINDOW and
  1033.           its neighbor to the right.
  1034.  
  1035.     `nil'
  1036.           The coordinates are not in any sense within WINDOW.
  1037.  
  1038.      The function `coordinates-in-window-p' does not require a frame as
  1039.      argument because it always uses the frame that window WINDOW is on.
  1040.  
  1041. 
  1042. File: elisp,  Node: Window Configurations,  Prev: Coordinates and Windows,  Up: Windows
  1043.  
  1044. Window Configurations
  1045. =====================
  1046.  
  1047.    A "window configuration" records the entire layout of a frame--all
  1048. windows, their sizes, which buffers they contain, what part of each
  1049. buffer is displayed, and the values of point and the mark.  You can
  1050. bring back an entire previous layout by restoring a window
  1051. configuration previously saved.
  1052.  
  1053.    If you want to record all frames instead of just one, use a frame
  1054. configuration instead of a window configuration.  *Note Frame
  1055. Configurations::.
  1056.  
  1057.  - Function: current-window-configuration
  1058.      This function returns a new object representing Emacs's current
  1059.      window configuration, namely the number of windows, their sizes
  1060.      and current buffers, which window is the selected window, and for
  1061.      each window the displayed buffer, the display-start position, and
  1062.      the positions of point and the mark.  An exception is made for
  1063.      point in the current buffer, whose value is not saved.
  1064.  
  1065.  - Function: set-window-configuration CONFIGURATION
  1066.      This function restores the configuration of Emacs's windows and
  1067.      buffers to the state specified by CONFIGURATION.  The argument
  1068.      CONFIGURATION must be a value that was previously returned by
  1069.      `current-window-configuration'.
  1070.  
  1071.      Here is a way of using this function to get the same effect as
  1072.      `save-window-excursion':
  1073.  
  1074.           (let ((config (current-window-configuration)))
  1075.             (unwind-protect
  1076.                 (progn (split-window-vertically nil)
  1077.                        ...)
  1078.               (set-window-configuration config)))
  1079.  
  1080.  - Special Form: save-window-excursion FORMS...
  1081.      This special form executes FORMS in sequence, preserving window
  1082.      sizes and contents, including the value of point and the portion
  1083.      of the buffer which is visible.  It also preserves the choice of
  1084.      selected window.  However, it does not restore the value of point
  1085.      in the current buffer; use `save-excursion' for that.
  1086.  
  1087.      The return value is the value of the final form in FORMS.  For
  1088.      example:
  1089.  
  1090.           (split-window)
  1091.                => #<window 25 on control.texi>
  1092.           (setq w (selected-window))
  1093.                => #<window 19 on control.texi>
  1094.           (save-window-excursion
  1095.             (delete-other-windows w)
  1096.             (switch-to-buffer "foo")
  1097.             'do-something)
  1098.                => do-something
  1099.                ;; The screen is now split again.
  1100.  
  1101.  - Function: window-configuration-p OBJECT
  1102.      This function returns `t' if OBJECT is a window configuration.
  1103.  
  1104.    Primitives to look inside of window configurations would make sense,
  1105. but none are implemented.  It is not clear they are useful enough to be
  1106. worth implementing.
  1107.  
  1108. 
  1109. File: elisp,  Node: Frames,  Next: Positions,  Prev: Windows,  Up: Top
  1110.  
  1111. Frames
  1112. ******
  1113.  
  1114.    A FRAME is a rectangle on the screen that contains one or more Emacs
  1115. windows.  A frame initially contains a single main window (plus perhaps
  1116. a minibuffer window) which you can subdivide vertically or horizontally
  1117. into smaller windows.
  1118.  
  1119.    When Emacs runs on a text-only terminal, it has just one frame, a
  1120. "terminal frame".  There is no way to create another terminal frame
  1121. after startup.  If Emacs has an X display, it does not make a terminal
  1122. frame; instead, it initially creates a single "X window frame".  You
  1123. can create more; see *Note Creating Frames::.
  1124.  
  1125.  - Function: framep OBJECT
  1126.      This predicate returns `t' if OBJECT is a frame, and `nil'
  1127.      otherwise.
  1128.  
  1129. * Menu:
  1130.  
  1131. * Creating Frames::        Creating additional X Window frames.
  1132. * Frame Parameters::        Controlling frame size, position, font, etc.
  1133. * Deleting Frames::        Frames last until explicitly deleted.
  1134. * Finding All Frames::        How to examine all existing frames.
  1135. * Frames and Windows::        A frame contains windows;
  1136.                   display of text always works through windows.
  1137. * Minibuffers and Frames::    How a frame finds the minibuffer to use.
  1138. * Input Focus::            What is this??
  1139. * Visibility of Frames::    Frames may be visible or invisible, or icons.
  1140. * Raising and Lowering::    Raising a frame makes it hide other X windows;
  1141.                   lowering it makes the others hide them.
  1142. * Frame Configurations::    Saving the state of all frames.
  1143. * Mouse Tracking::        Getting events that say when the mouse moves.
  1144. * Mouse Position::        Asking where the mouse is, or moving it.
  1145. * Pop-Up Menus::        Displaying a menu for the user to select from.
  1146. * X Selections::        Transferring text to and from other X clients.
  1147. * X Server::
  1148.  
  1149.    *Note Display::, for related information.
  1150.  
  1151. 
  1152. File: elisp,  Node: Creating Frames,  Next: Frame Parameters,  Up: Frames
  1153.  
  1154. Creating Frames
  1155. ===============
  1156.  
  1157.    To create a new frame, call the function `make-frame'.
  1158.  
  1159.  - Function: make-frame ALIST
  1160.      This function creates a new frame, if the display mechanism permits
  1161.      creation of frames.  (An X server does; an ordinary terminal does
  1162.      not.)
  1163.  
  1164.      The argument is an alist specifying frame parameters.  Any
  1165.      parameters not mentioned in ALIST default according to the value
  1166.      of the variable `default-frame-alist'; parameters not specified
  1167.      there either default from the standard X defaults file and X
  1168.      resources.
  1169.  
  1170.      The set of possible parameters depends in principle on what kind of
  1171.      window system Emacs uses to display its the frames.  *Note X Frame
  1172.      Parameters::, for documentation of individual parameters you can
  1173.      specify when creating an X window frame.
  1174.  
  1175.  - Variable: default-frame-alist
  1176.      An alist specifying default values of frame parameters.  Each
  1177.      element has the form:
  1178.  
  1179.           (PARAMETER . VALUE)
  1180.  
  1181.      If you use options that specify window appearance when you invoke
  1182.      Emacs, they take effect by adding elements to
  1183.      `default-frame-alist'.
  1184.  
  1185. 
  1186. File: elisp,  Node: Frame Parameters,  Next: Deleting Frames,  Prev: Creating Frames,  Up: Frames
  1187.  
  1188. Frame Parameters
  1189. ================
  1190.  
  1191.    A frame has many parameters that control how it displays.
  1192.  
  1193. * Menu:
  1194.  
  1195. * Parameter Access::       How to change a frame's parameters.
  1196. * Initial Parameters::       Specifying frame parameters when you make a frame.
  1197. * X Frame Parameters::     Individual parameters documented.
  1198. * Size And Position::      Changing the size and position of a frame.
  1199.  
  1200. 
  1201. File: elisp,  Node: Parameter Access,  Next: Initial Parameters,  Up: Frame Parameters
  1202.  
  1203. Access to Frame Parameters
  1204. --------------------------
  1205.  
  1206.    These functions let you read and change the parameter values of a
  1207. frame.
  1208.  
  1209.  - Function: frame-parameters FRAME
  1210.      The function `frame-parameters' returns an alist of all the
  1211.      parameters of FRAME.
  1212.  
  1213.  - Function: modify-frame-parameters FRAME ALIST
  1214.      This function alters the parameters of frame FRAME based on the
  1215.      elements of ALIST.  Each element of ALIST has the form `(PARM .
  1216.      VALUE)', where PARM is a symbol naming a parameter.  If you don't
  1217.      mention a parameter in ALIST, its value doesn't change.
  1218.  
  1219.